package top.sehnsucht.service.impl;

import top.sehnsucht.dao.ArticleDao;
import top.sehnsucht.entity.Article;
import top.sehnsucht.service.ArticleService;

import java.util.ArrayList;

/**
 * @Description:
 * @Author: Cai
 * @CreateTime: 2021/12/21
 */

public class ArticleServiceImpl implements ArticleService {
    private ArticleDao articleDao;

    public ArticleServiceImpl(ArticleDao articleDao) {
        this.articleDao = articleDao;
    }

    @Override
    public ArrayList<Article> selectAllArticle() {
        return articleDao.selectAllArticle();
    }

    @Override
    public ArrayList<Article> selectArticleById(int stuId) {
        return articleDao.selectArticleById(stuId);
    }

    @Override
    public void insertArticle(Article article) {
        articleDao.insertArticle(article);
    }

    @Override
    public void updateArticle(Article article) {
        articleDao.updateArticle(article);
    }
}
